package edu.uw.tcss360.group6.gui.Actions;

import edu.uw.tcss360.group6.gui.GUI;

import javax.swing.*;
import java.awt.event.ActionEvent;

/**
 * Created with IntelliJ IDEA.
 * edu.uw.tcss360.group6.model.User: Lemtzas
 * Date: 2/23/13
 * Time: 2:17 PM
 * To change this template use File | Settings | File Templates.
 */
@SuppressWarnings("serial")
public class LogoutAction extends AbstractAction {

    public LogoutAction() {
        super("Log Out");
    }
    @Override
    public void actionPerformed(ActionEvent e) {
        GUI.instance().my_side_panel.logpanel.log("You are now logged out!");
        GUI.instance().my_main_panel.clearCardHistory();
        GUI.instance().currentUser = null;
        GUI.instance().my_side_panel.datacardpanel.setCard("login");
        GUI.instance().my_main_panel.setCard("splash");
    }
}
